<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const info = {
        id: 100,
        [Symbol.toPrimitive]: function () {
          console.log("hello");
        },
      };
      // 暗示我向字符串或数字转换
      String(info);
      info + "hello";
      Number(info);
      info - 100;
    </script>
  </body>
</html>
